
. 
. *******************************
. *
. * Produce Tables for ReStats Manuscript
. *
. *******************************
. 
. use loanshark_data_final, clear

. 
. 
. **********************************************************************************************
. ******************************* Table 1: Borrower's Characteristics **************************
. **********************************************************************************************
. 
. preserve

. keep if id_tag == 1
(9,942 observations deleted)

. *
. ************************* Panel A: Basic
. *
. 
. tab gender 

     Gender |      Freq.     Percent        Cum.
------------+-----------------------------------
       Male |        981       90.08       90.08
     Female |        108        9.92      100.00
------------+-----------------------------------
      Total |      1,089      100.00

. tab ethnicity

  Ethnicity |      Freq.     Percent        Cum.
------------+-----------------------------------
    Chinese |        812       74.50       74.50
      Malay |        154       14.13       88.62
     Indian |        121       11.10       99.72
      Other |          3        0.28      100.00
------------+-----------------------------------
      Total |      1,090      100.00

. tab edu

     Highest Education |
                 Level |      Freq.     Percent        Cum.
-----------------------+-----------------------------------
            Illiterate |         31        2.84        2.84
     Elementary School |        219       20.09       22.94
         Junior School |        399       36.61       59.54
           Polytechnic |        160       14.68       74.22
        Junior College |         27        2.48       76.70
Diploma or Certificate |        211       19.36       96.06
              Bachelor |         43        3.94      100.00
-----------------------+-----------------------------------
                 Total |      1,090      100.00

. tab workstatus

    Working |
     Status |      Freq.     Percent        Cum.
------------+-----------------------------------
    Jobless |         15        1.38        1.38
  Part time |         76        6.98        8.36
  Full time |        998       91.64      100.00
------------+-----------------------------------
      Total |      1,089      100.00

. tab incomemon

                    Monthly Income |      Freq.     Percent        Cum.
-----------------------------------+-----------------------------------
No Fixed Income or Less than S$500 |          3        0.28        0.28
                      S$500-S$1000 |         27        2.48        2.75
                     S$1000-S$2000 |        385       35.35       38.11
                     S$2000-S$3000 |        401       36.82       74.93
                     S$3000-S$5000 |        216       19.83       94.77
                  More than S$5000 |         57        5.23      100.00
-----------------------------------+-----------------------------------
                             Total |      1,089      100.00

. 
. *
. ************************** Panel B: Borrowing Behavior & Spending
. *
. 
. tab debt 

Total Debt as of |
           today |      Freq.     Percent        Cum.
-----------------+-----------------------------------
         No debt |         80        7.34        7.34
Less than 1000S$ |         47        4.31       11.65
  1000 to 3000S$ |        146       13.39       25.05
  3000 to 5000S$ |        213       19.54       44.59
 5000 to 10000S$ |        308       28.26       72.84
 10000S$ or more |        296       27.16      100.00
-----------------+-----------------------------------
           Total |      1,090      100.00

. tab  borrowexp 

    How long since |
    First Borrowed |
             Money |      Freq.     Percent        Cum.
-------------------+-----------------------------------
  Less than 1 year |          3        0.28        0.28
      1 to 3 years |        144       13.21       13.49
      3 to 5 years |        453       41.56       55.05
     5 to 10 years |        418       38.35       93.39
More than 10 years |         72        6.61      100.00
-------------------+-----------------------------------
             Total |      1,090      100.00

. 
. rename famfrdborrowfreq bvar1

. rename borrowfreq bvar2

. rename famfrdfailrepayfreq bvar3

. rename failrepayfreq bvar4

. rename drinking bvar5

. rename drug bvar6

. rename gambling bvar7

. count
  1,090

. matrix mat0=J(1,4,r(N))

. matrix mat1=J(7,4,0)

. matrix mat2=J(7,4,0)

. 
. forval r=1(1)7{
  2.         forval c=1(1)4{
  3.         count if bvar`r'==`c'
  4.         return list
  5.         matrix mat1[`r',`c']=r(N)
  6.         matrix mat2[`r',`c']=mat1[`r',`c']/mat0[1,`c']*100
  7.         }
  8. }
  27

scalars:
                  r(N) =  27
  341

scalars:
                  r(N) =  341
  415

scalars:
                  r(N) =  415
  307

scalars:
                  r(N) =  307
  14

scalars:
                  r(N) =  14
  454

scalars:
                  r(N) =  454
  454

scalars:
                  r(N) =  454
  166

scalars:
                  r(N) =  166
  78

scalars:
                  r(N) =  78
  363

scalars:
                  r(N) =  363
  529

scalars:
                  r(N) =  529
  120

scalars:
                  r(N) =  120
  6

scalars:
                  r(N) =  6
  318

scalars:
                  r(N) =  318
  598

scalars:
                  r(N) =  598
  168

scalars:
                  r(N) =  168
  39

scalars:
                  r(N) =  39
  181

scalars:
                  r(N) =  181
  440

scalars:
                  r(N) =  440
  428

scalars:
                  r(N) =  428
  759

scalars:
                  r(N) =  759
  135

scalars:
                  r(N) =  135
  112

scalars:
                  r(N) =  112
  84

scalars:
                  r(N) =  84
  106

scalars:
                  r(N) =  106
  301

scalars:
                  r(N) =  301
  315

scalars:
                  r(N) =  315
  368

scalars:
                  r(N) =  368

. matrix matT1Borr=mat2

. matrix rownames matT1Borr = Borrow_From_FamilyFriends Borrow_From_Loanshark Fail_to_Repay_FamFriend Fail_to_Repay_Loanshark Drinking 
> Drug_Abuse Gambling

. matrix colnames matT1Borr = Never Occasionally Regular Very_Frequently

. matrix list matT1Borr

matT1Borr[7,4]
                     Never  Occasionally       Regular  Very_Frequ~y
Borrow_Fro~s     2.4770642     31.284404     38.073394     28.165138
Borrow_Fro~k     1.2844037     41.651376     41.651376     15.229358
Fail_to_Re~d     7.1559633     33.302752      48.53211     11.009174
Fail_to_Re~k     .55045872     29.174312     54.862385     15.412844
    Drinking     3.5779817     16.605505     40.366972     39.266055
  Drug_Abuse     69.633028     12.385321     10.275229      7.706422
    Gambling     9.7247706     27.614679     28.899083     33.761468

. outtable using table_borrower, mat(matT1Borr) append caption("Borrow Behavior") f(%9.2f) nobox

. rename bvar1 famfrdborrowfreq

. rename bvar2 borrowfreq

. rename bvar3 famfrdfailrepayfreq

. rename bvar4 failrepayfreq

. rename bvar5 drinking

. rename bvar6 drug

. rename bvar7 gambling

. 
. 
. 
. 
. rename savepct bvar1

. rename lavishpct bvar2

. count
  1,090

. matrix mat0=J(1,4,r(N))

. matrix mat1=J(2,4,0)

. matrix mat2=J(2,4,0)

. 
. forval r=1(1)2{
  2.         forval c=1(1)4{
  3.         count if bvar`r'==`c'
  4.         return list
  5.         matrix mat1[`r',`c']=r(N)
  6.         matrix mat2[`r',`c']=mat1[`r',`c']/mat0[1,`c']*100
  7.         }
  8. }
  695

scalars:
                  r(N) =  695
  325

scalars:
                  r(N) =  325
  63

scalars:
                  r(N) =  63
  6

scalars:
                  r(N) =  6
  5

scalars:
                  r(N) =  5
  35

scalars:
                  r(N) =  35
  427

scalars:
                  r(N) =  427
  623

scalars:
                  r(N) =  623

. matrix matT1Spend=mat2

. matrix rownames matT1Spend = Saving Lavish_Spending

. *Col%
. matrix colnames matT1Spend = Less_than_10\% 10\%_-_20\% 20\%_-_40\% More_than_40\% 

. matrix list matT1Spend

matT1Spend[2,4]
              Less_than_~%   10\%_-_20\%   20\%_-_40\%  More_than_~%
      Saving     63.761468     29.816514     5.7798165     .55045872
Lavish_Spe~g      .4587156     3.2110092     39.174312     57.155963

. 
. outtable using table_borrower, mat(matT1Spend) replace caption("Spending") f(%9.2f) nobox

. rename bvar1 savepct

. rename bvar2 lavishpct

. 
. restore

. 
. 
. 
. *************************************************************************************
. ****************************** Table 2: Loan Characteristics ************************
. *************************************************************************************
. 
. *
. ************************** Panel A
. *
. 
. lab var repayendD "Finally Repay"

. 
. local vars = "loan loanasked rate_pct repaytime repayfull repayendD" 

. 
. 
.         foreach v in `vars' {
  2.                         sum `v'         
  3.                         sum `v' if enforcement == 0
  4.                         sum `v' if enforcement == 1
  5.         }

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        loan |     11,018    1452.921    1552.111         30      50000

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        loan |      8,878    1669.706    1647.498         50      50000

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
        loan |      2,140    553.5654    373.2091         30       3000

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   loanasked |     10,821     1775.88     1614.56        100      50000

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   loanasked |      8,735    1956.943    1732.688        100      50000

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   loanasked |      2,086    1017.689    489.1226        300       5000

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    rate_pct |     11,032    22.10334    6.581334          2         50

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    rate_pct |      8,878    19.24273    2.404136          2         35

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    rate_pct |      2,154    33.89369    5.026943          4         50

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   repaytime |     10,570    3.398729    1.823131          0         12

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   repaytime |      8,434    3.133919    1.808173          0         12

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   repaytime |      2,136    4.444335    1.472785          0        8.5

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   repayfull |     11,031    .1397879    .3467825          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   repayfull |      8,877    .1719049     .377319          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   repayfull |      2,154     .007428    .0858853          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   repayendD |     11,031    .9246668    .2639401          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   repayendD |      8,878    .9101149    .2860332          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
   repayendD |      2,153    .9846725    .1228802          0          1

.         
. count
  11,032

. tab enforcement

Enforcement |
 Year Dummy |      Freq.     Percent        Cum.
------------+-----------------------------------
  2009-2013 |      8,878       80.47       80.47
  2014-2016 |      2,154       19.53      100.00
------------+-----------------------------------
      Total |     11,032      100.00

.         
. 
. *
. ************************** Panel B Repayment 
. *
. 
. *** How to repay
. sum howrepayn1  howrepayn4 howrepayn2 howrepayn3 howrepayn6 howrepayn9 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  howrepayn1 |     11,025    .8604989    .3464844          0          1
  howrepayn4 |     11,025    .4716553    .4992186          0          1
  howrepayn2 |     11,025    .2658503     .441805          0          1
  howrepayn3 |     11,025    .2755556    .4468141          0          1
  howrepayn6 |     11,025    .1395011    .3464844          0          1
-------------+---------------------------------------------------------
  howrepayn9 |     11,025     .054966    .2279242          0          1

. 
. tab conscription

conscriptio |
          n |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |        173       14.10       14.10
          1 |      1,054       85.90      100.00
------------+-----------------------------------
      Total |      1,227      100.00

. 
. *** Harassment
. 
. sum forcen11 forcen1  

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    forcen11 |     11,032    .5093365    .4999355          0          1
     forcen1 |     11,032    .4270305    .4946692          0          1

. 
. * compute Humiliation (potential loss of face) 
. sum forcen2 forcen3 forcen4  forcen6 forcen7  forcen16 forcen17 forcen18 forcen19

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     forcen2 |     11,032    .0194888    .1382414          0          1
     forcen3 |     11,032    .0011784     .034309          0          1
     forcen4 |     11,032    .0031726    .0562389          0          1
     forcen6 |     11,032    .0204859    .1416616          0          1
     forcen7 |     11,032    .0229333    .1496976          0          1
-------------+---------------------------------------------------------
    forcen16 |     11,032    .1725888    .3779086          0          1
    forcen17 |     11,032    .0034445    .0585916          0          1
    forcen18 |     11,032    .0113307    .1058457          0          1
    forcen19 |     11,032    .0179478    .1327677          0          1

. di .0194888+ .0011784+ .0031726+.0204859+.0229333 + .1725888 + .0034445+.0113307 + .0179478
.2725708

. 
. 
. sum forcen12 forcen0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    forcen12 |     11,032    .2678571    .4428628          0          1
     forcen0 |     11,032    .1948876    .3961321          0          1

. 
. * Compute vandalism
.  sum forcen5 forcen13 forcen14 forcen15  forcen20

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
     forcen5 |     11,032    .0590102    .2356544          0          1
    forcen13 |     11,032    .0073423    .0853758          0          1
    forcen14 |     11,032    .0658086    .2479584          0          1
    forcen15 |     11,032    .0300036    .1706049          0          1
    forcen20 |     11,032    .0002719     .016489          0          1

. di .0590102+ .0073423 + .0658086 +.0300036+ .0002719 
.1624366

. 
. 
. *
. ************************** Panel C Condition
. *
. 
. *** Borrow Condition
. tab condit_a

   Borrowing Conditions |      Freq.     Percent        Cum.
------------------------+-----------------------------------
Under normal conditions |      4,461       40.46       40.46
         After drinking |      2,743       24.88       65.34
             Under drug |        502        4.55       69.89
         Under gambling |      2,162       19.61       89.50
           Under threat |      1,158       10.50      100.00
------------------------+-----------------------------------
                  Total |     11,026      100.00

. sum conditn*

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    conditn1 |     11,026    .4045892    .4908346          0          1
    conditn2 |     11,026    .3393796    .4735203          0          1
    conditn3 |     11,026    .0874297    .2824765          0          1
    conditn4 |     11,026    .4975512    .5000167          0          1
    conditn5 |     11,026    .1436604     .350761          0          1
-------------+---------------------------------------------------------
    conditn6 |     11,026    .0001814    .0134675          0          1
    conditn7 |     11,026           0           0          0          0

. sum  conditn4  conditn1 conditn2 conditn5  conditn3 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    conditn4 |     11,026    .4975512    .5000167          0          1
    conditn1 |     11,026    .4045892    .4908346          0          1
    conditn2 |     11,026    .3393796    .4735203          0          1
    conditn5 |     11,026    .1436604     .350761          0          1
    conditn3 |     11,026    .0874297    .2824765          0          1

. 
. 
. *** Screening Docs
. sum collateraln2 collateraln4 collateraln7 collateraln8

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
collateraln2 |     11,031    .9900281    .0993648          0          1
collateraln4 |     11,031    .7090019    .4542432          0          1
collateraln7 |     11,031    .1571934    .3639995          0          1
collateraln8 |     11,031    .0369867    .1887376          0          1

. 
. sum  collateraln3 collateraln6 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
collateraln3 |     11,031    .0151392    .1221119          0          1
collateraln6 |     11,031    .0058925    .0765395          0          1

. di .01513+.0058
.02093

. 
. 
. *** Why this lender
. sum whythisahlongn7 whythisahlongn2 whythisahlongn8 whythisahlongn9 whythisahlongn3  whythisahlongn1  whythisahlongn4

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
whythisah~n7 |     11,024    .5628628     .496055          0          1
whythisah~n2 |     11,024    .4603592    .4984487          0          1
whythisah~n8 |     11,024    .2613389    .4393841          0          1
whythisah~n9 |     11,024    .2404753    .4273915          0          1
whythisah~n3 |     11,024    .1930334    .3946969          0          1
-------------+---------------------------------------------------------
whythisah~n1 |     11,024     .109307    .3120381          0          1
whythisah~n4 |     11,024    .0763788    .2656153          0          1

. 
. 
. *** Why Borrow
. sum reasonn5 reasonn4 reasonn14 reasonn9  reasonn6 reasonn12  reasonn10

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    reasonn5 |     11,020    .5513612    .4973776          0          1
    reasonn4 |     11,020    .4786751    .4995677          0          1
   reasonn14 |     11,020    .3431942    .4747972          0          1
    reasonn9 |     11,020    .2134301    .4097474          0          1
    reasonn6 |     11,020    .1436479    .3507483          0          1
-------------+---------------------------------------------------------
   reasonn12 |     11,020    .1323049    .3388373          0          1
   reasonn10 |     11,020     .130127    .3364584          0          1

. 
. 
.         
. *
. ************************** Panel D: Contract Dynamics ****************** 
. *
. 
. ***********************************************************
. *********** Step A: Generate few more variables ***********
. ***********************************************************
. 
. ******************* Create tags *******************
. preserve

. sort id sharkid5 enforcement year

. egen pair5_year_tag = tag(id sharkid5 year)

. 
. ** At borrower-sharkid5 pair level: max number of times transacted with a lender
. bys id sharkid5 (year month): gen pair5_num     = _n 

. 
. ******** END: Following are newly added for AER-Insight ********
. 
. gen never_contacted = (borrowhist == 0)

. lab var never_contacted "Never contracted with this lender"

. 
. gen contract_num_year = .
(11,032 missing values generated)

. replace contract_num_year = pair5_num if pair5_year_tag
(8,233 real changes made)

. lab var contract_num_year "Times contract with this lender per year"

. 
. 
. gen rate_never_contacted =.
(11,032 missing values generated)

. replace rate_never_contacted = rate*100 if borrowhist == 0
(1,532 real changes made)

. lab var rate_never_contacted "Nominal rate (if never contracted)"

. 
. 
. local vars4 "never_contacted contract_num_year rate_never_contacted"

. 
. foreach v4 in `vars4' {
  2.                         sum `v4' 
  3.                         local `v4'_mean: disp %9.2f r(mean)
  4.                         local `v4'_sd: disp %9.2f r(sd)
  5.         }

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
never_cont~d |     11,032    .1388687    .3458252          0          1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
contract_n~r |      8,233    1.800316    1.235495          1          7

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
rate_never~d |      1,532    24.98368    7.896894         10         50

.         
. restore

. ***************************************************************************
. ****************************** Table 3: Regression ************************
. ***************************************************************************
. 
. 
. preserve

. 
. sum rate_pct loan loanasked lendrate totalpaid latefee_share default howrepayn3 howrepayn2 lenderrequestwork conscription  noforce re
> mind repayendD if enforcement==0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    rate_pct |      8,878    19.24273    2.404136          2         35
        loan |      8,878    1669.706    1647.498         50      50000
   loanasked |      8,735    1956.943    1732.688        100      50000
    lendrate |      8,735     .858755    .2717791        .05         10
   totalpaid |      8,878    2606.507    2198.403          0      80000
-------------+---------------------------------------------------------
latefee_sh~e |      7,309    .2167885    .9563902  -67.57143       .952
     default |      8,877    .8292216    .3763364          0          1
  howrepayn3 |      8,871    .2455191    .4304188          0          1
  howrepayn2 |      8,871    .2360501    .4246772          0          1
lenderrequ~k |      7,362    .0896496    .2856984          0          1
-------------+---------------------------------------------------------
conscription |        660    .9636364    .1873352          0          1
     noforce |      8,875    .2351549    .4241195          0          1
      remind |      8,875    .7400563    .4386281          0          1
   repayendD |      8,878    .9101149    .2860332          0          1

. 
. sum rate_pct loan loanasked lendrate totalpaid latefee_share default howrepayn3 howrepayn2 lenderrequestwork conscription  noforce re
> mind repayendD if enforcement==1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
    rate_pct |      2,154    33.89369    5.026943          4         50
        loan |      2,140    553.5654    373.2091         30       3000
   loanasked |      2,086    1017.689    489.1226        300       5000
    lendrate |      2,072    .5588851    .2343304        .06          3
   totalpaid |      2,154    1838.496    1013.851          0      10000
-------------+---------------------------------------------------------
latefee_sh~e |      2,130    .5884415    .2317974      -5.25   .9710714
     default |      2,153    .9939619    .0774882          0          1
  howrepayn3 |      2,154    .3992572    .4898595          0          1
  howrepayn2 |      2,154    .3885794    .4875406          0          1
lenderrequ~k |      2,141    .2685661    .4433172          0          1
-------------+---------------------------------------------------------
conscription |        567    .7372134    .4405361          0          1
     noforce |      2,153     .028797    .1672745          0          1
      remind |      2,153    .9647004    .1845788          0          1
   repayendD |      2,153    .9846725    .1228802          0          1

. 
. 
. gen coef = .
(11,032 missing values generated)

. gen fake = 0

. gen ydum = .
(11,032 missing values generated)

. replace ydum = 0 if _n==1
(1 real change made)

. gen enforced = 0 + 1*(_n>5) if _n<9
(11,024 missing values generated)

. gen trend = _n

. 
. 
. foreach v in rate_pct loan loanasked lendrate totalpaid latefee_share default howrepayn3 howrepayn2 lenderrequestwork conscription re
> payendD{
  2. local rate_pctlbl "Nominal Rate"
  3. local loanlbl "Loan"
  4. local loanaskedlbl "Loan Asked"
  5. local lendratelbl "Percent of Loan Asked Lent"
  6. local totalpaidlbl "Total Paid"
  7. local defaultlbl "Default"
  8. local howrepayn2lbl "Repay by Borrow from Friends"
  9. local howrepayn3lbl "Repay by Borrow from Family"
 10. local repayendlbl "Repaid Eventually"
 11. local latefee_sharelbl "Late Fee Paid as a Share of Loan"
 12. local conscriptionlbl "Request Accepted if Requested"
 13. local lenderrequestworklbl "Lender Requested Work for Him"
 14. 
. qui xi: reg `v' i.year
 15.         forvalues x = 10/16 {
 16.                 replace ydum = _b[_Iyear_20`x'] if _n==`x'-8
 17.                 }
 18. di "*********  `v' ****************"
 19. 
. reg ydum enforced
 20. est store ols
 21.         
. qui xi: areg `v' i.year, abs(id)
 22.         forvalues x = 10/16 {
 23.                 quietly replace ydum = _b[_Iyear_20`x'] if _n==`x'-8
 24.                 }
 25. reg ydum enforced
 26. est store fe_b  
 27. 
. qui xi: areg `v' i.year, abs(sharkid5)
 28.         forvalues x = 10/16 {
 29.                 quietly replace ydum = _b[_Iyear_20`x'] if _n==`x'-8
 30.                 }
 31. reg ydum enforced
 32. est store fe_l  
 33. 
. qui xi: areg `v' i.year, abs(shark5_bor)
 34.         forvalues x = 10/16 {
 35.                 quietly replace ydum = _b[_Iyear_20`x'] if _n==`x'-8
 36.                 }
 37. reg ydum enforced       
 38. est store fe_bl 
 39. 
. lab var enforced "``v'lbl'"
 40. esttab ols fe_b fe_l fe_bl using table_reg_restats.tex, append  ///
>         mtitle("OLS" "FE (Borrower)" "FE (Lender)" "FE (Borr-Lender)") noconstant ///
>         label booktabs b(3) se(3) eqlabels(none)  unstack  noobs nostar ///
>         fragment nolines nonumbers
 41.         
. }
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  rate_pct ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     66.93
       Model |  412.531215         1  412.531215   Prob > F        =    0.0002
    Residual |  36.9827833         6  6.16379721   R-squared       =    0.9177
-------------+----------------------------------   Adj R-squared   =    0.9040
       Total |  449.513998         7  64.2162854   Root MSE        =    2.4827

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   14.83296   1.813107     8.18   0.000     10.39644    19.26947
       _cons |   .0113828   1.110297     0.01   0.992    -2.705416    2.728182
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     92.94
       Model |  425.174805         1  425.174805   Prob > F        =    0.0001
    Residual |  27.4475415         6  4.57459024   R-squared       =    0.9394
-------------+----------------------------------   Adj R-squared   =    0.9293
       Total |  452.622347         7  64.6603352   Root MSE        =    2.1388

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   15.05855    1.56198     9.64   0.000     11.23652    18.88058
       _cons |  -.0962108   .9565135    -0.10   0.923    -2.436715    2.244293
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     69.06
       Model |   412.46088         1   412.46088   Prob > F        =    0.0002
    Residual |  35.8353184         6  5.97255307   R-squared       =    0.9201
-------------+----------------------------------   Adj R-squared   =    0.9067
       Total |  448.296199         7  64.0423141   Root MSE        =    2.4439

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   14.83169   1.784758     8.31   0.000     10.46455    19.19884
       _cons |   .0283642   1.092937     0.03   0.980    -2.645956    2.702684
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     97.82
       Model |  395.321531         1  395.321531   Prob > F        =    0.0001
    Residual |  24.2480337         6  4.04133895   R-squared       =    0.9422
-------------+----------------------------------   Adj R-squared   =    0.9326
       Total |  419.569565         7  59.9385092   Root MSE        =    2.0103

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   14.52027   1.468122     9.89   0.000      10.9279    18.11263
       _cons |   .0625547   .8990371     0.07   0.947     -2.13731    2.262419
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  loan ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     65.77
       Model |  2189255.59         1  2189255.59   Prob > F        =    0.0002
    Residual |  199708.584         6   33284.764   R-squared       =    0.9164
-------------+----------------------------------   Adj R-squared   =    0.9025
       Total |  2388964.17         7  341280.596   Root MSE        =    182.44

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -1080.557   133.2362    -8.11   0.000    -1406.574   -754.5397
       _cons |   53.63888   81.59015     0.66   0.535     -146.005    253.2828
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =    151.64
       Model |  2486336.98         1  2486336.98   Prob > F        =    0.0000
    Residual |  98376.0024         6  16396.0004   R-squared       =    0.9619
-------------+----------------------------------   Adj R-squared   =    0.9556
       Total |  2584712.98         7  369244.711   Root MSE        =    128.05

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -1151.541   93.51221   -12.31   0.000    -1380.357   -922.7247
       _cons |  -67.68622    57.2643    -1.18   0.282    -207.8069    72.43448
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     71.32
       Model |  1970907.57         1  1970907.57   Prob > F        =    0.0002
    Residual |  165803.983         6  27633.9972   R-squared       =    0.9224
-------------+----------------------------------   Adj R-squared   =    0.9095
       Total |  2136711.56         7  305244.508   Root MSE        =    166.23

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -1025.256   121.4007    -8.45   0.000    -1322.313   -728.1996
       _cons |   18.48405   74.34245     0.25   0.812    -163.4254    200.3935
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     28.86
       Model |  2587689.44         1  2587689.44   Prob > F        =    0.0017
    Residual |  538031.119         6  89671.8531   R-squared       =    0.8279
-------------+----------------------------------   Adj R-squared   =    0.7992
       Total |  3125720.56         7  446531.509   Root MSE        =    299.45

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -1174.777   218.6893    -5.37   0.002     -1709.89   -639.6637
       _cons |  -263.5341   133.9193    -1.97   0.097    -591.2227    64.15459
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  loanasked ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     40.04
       Model |  1529259.85         1  1529259.85   Prob > F        =    0.0007
    Residual |  229159.933         6  38193.3222   R-squared       =    0.8697
-------------+----------------------------------   Adj R-squared   =    0.8480
       Total |  1758419.78         7  251202.825   Root MSE        =    195.43

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -903.1087   142.7227    -6.33   0.001    -1252.339   -553.8788
       _cons |   141.2821   87.39945     1.62   0.157    -72.57662    355.1409
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     62.70
       Model |  1945415.13         1  1945415.13   Prob > F        =    0.0002
    Residual |  186175.275         6  31029.2126   R-squared       =    0.9127
-------------+----------------------------------   Adj R-squared   =    0.8981
       Total |  2131590.41         7  304512.915   Root MSE        =    176.15

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -1018.604   128.6426    -7.92   0.000    -1333.381   -703.8273
       _cons |   18.20746   78.77717     0.23   0.825    -174.5533    210.9682
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     55.32
       Model |  1356755.03         1  1356755.03   Prob > F        =    0.0003
    Residual |  147161.096         6  24526.8494   R-squared       =    0.9021
-------------+----------------------------------   Adj R-squared   =    0.8858
       Total |  1503916.13         7  214845.161   Root MSE        =    156.61

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -850.6484   114.3721    -7.44   0.000    -1130.507   -570.7898
       _cons |   102.3368   70.03835     1.46   0.194    -69.04086    273.7145
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     21.92
       Model |  1608292.93         1  1608292.93   Prob > F        =    0.0034
    Residual |  440208.373         6  73368.0622   R-squared       =    0.7851
-------------+----------------------------------   Adj R-squared   =    0.7493
       Total |   2048501.3         7  292643.043   Root MSE        =    270.87

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -926.1513   197.8121    -4.68   0.003     -1410.18   -442.1225
       _cons |  -117.0772   121.1347    -0.97   0.371    -413.4831    179.3287
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  lendrate ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     36.21
       Model |  .136836094         1  .136836094   Prob > F        =    0.0009
    Residual |  .022671112         6  .003778519   R-squared       =    0.8579
-------------+----------------------------------   Adj R-squared   =    0.8342
       Total |  .159507206         7  .022786744   Root MSE        =    .06147

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.2701467   .0448911    -6.02   0.001    -.3799913   -.1603022
       _cons |  -.0301847   .0274901    -1.10   0.314    -.0974505     .037081
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     21.44
       Model |  .133755665         1  .133755665   Prob > F        =    0.0036
    Residual |  .037425036         6  .006237506   R-squared       =    0.7814
-------------+----------------------------------   Adj R-squared   =    0.7449
       Total |  .171180701         7  .024454386   Root MSE        =    .07898

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.2670887   .0576773    -4.63   0.004    -.4082199   -.1259574
       _cons |  -.0252244     .03532    -0.71   0.502    -.1116492    .0612005
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     33.06
       Model |  .136106214         1  .136106214   Prob > F        =    0.0012
    Residual |  .024698374         6  .004116396   R-squared       =    0.8464
-------------+----------------------------------   Adj R-squared   =    0.8208
       Total |  .160804587         7  .022972084   Root MSE        =    .06416

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.2694253   .0468552    -5.75   0.001    -.3840759   -.1547747
       _cons |  -.0282979   .0286928    -0.99   0.362    -.0985068    .0419109
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     30.58
       Model |  .170186987         1  .170186987   Prob > F        =    0.0015
    Residual |   .03338797         6  .005564662   R-squared       =    0.8360
-------------+----------------------------------   Adj R-squared   =    0.8087
       Total |  .203574958         7  .029082137   Root MSE        =     .0746

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.3012746   .0544777    -5.53   0.001    -.4345767   -.1679725
       _cons |  -.0507945   .0333606    -1.52   0.179    -.1324251     .030836
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  totalpaid ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      7.54
       Model |  781011.305         1  781011.305   Prob > F        =    0.0335
    Residual |  621735.766         6  103622.628   R-squared       =    0.5568
-------------+----------------------------------   Adj R-squared   =    0.4829
       Total |  1402747.07         7  200392.439   Root MSE        =     321.9

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -645.3986   235.0859    -2.75   0.033    -1220.633   -70.16402
       _cons |   136.7819   143.9602     0.95   0.379    -215.4759    489.0397
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     18.34
       Model |   1036874.7         1   1036874.7   Prob > F        =    0.0052
    Residual |  339171.442         6  56528.5737   R-squared       =    0.7535
-------------+----------------------------------   Adj R-squared   =    0.7124
       Total |  1376046.14         7  196578.021   Root MSE        =    237.76

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -743.6396   173.6334    -4.28   0.005    -1168.505   -318.7739
       _cons |  -123.8855   106.3283    -1.17   0.288    -384.0615    136.2906
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      6.92
       Model |  666247.637         1  666247.637   Prob > F        =    0.0390
    Residual |  577627.206         6   96271.201   R-squared       =    0.5356
-------------+----------------------------------   Adj R-squared   =    0.4582
       Total |  1243874.84         7  177696.406   Root MSE        =    310.28

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -596.0974   226.5936    -2.63   0.039    -1150.552   -41.64291
       _cons |   75.94445   138.7596     0.55   0.604    -263.5882    415.4771
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      9.09
       Model |  669486.425         1  669486.425   Prob > F        =    0.0236
    Residual |  442033.149         6  73672.1914   R-squared       =    0.6023
-------------+----------------------------------   Adj R-squared   =    0.5360
       Total |  1111519.57         7  158788.511   Root MSE        =    271.43

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -597.5445   198.2217    -3.01   0.024    -1082.575   -112.5135
       _cons |  -348.8575   121.3855    -2.87   0.028    -645.8771   -51.83787
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  latefee_share ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =    129.36
       Model |   .25073897         1   .25073897   Prob > F        =    0.0000
    Residual |  .011629585         6  .001938264   R-squared       =    0.9557
-------------+----------------------------------   Adj R-squared   =    0.9483
       Total |  .262368555         7  .037481222   Root MSE        =    .04403

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .3656876   .0321518    11.37   0.000     .2870149    .4443604
       _cons |   .0152629   .0196889     0.78   0.468    -.0329141      .06344
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     19.09
       Model |  .268379783         1  .268379783   Prob > F        =    0.0047
    Residual |  .084372101         6  .014062017   R-squared       =    0.7608
-------------+----------------------------------   Adj R-squared   =    0.7210
       Total |  .352751884         7  .050393126   Root MSE        =    .11858

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |    .378333   .0866011     4.37   0.005     .1664279    .5902382
       _cons |  -.0207678   .0530321    -0.39   0.709    -.1505326    .1089971
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =    110.54
       Model |  .238538726         1  .238538726   Prob > F        =    0.0000
    Residual |  .012947759         6   .00215796   R-squared       =    0.9485
-------------+----------------------------------   Adj R-squared   =    0.9399
       Total |  .251486485         7  .035926641   Root MSE        =    .04645

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |     .35668   .0339251    10.51   0.000     .2736683    .4396918
       _cons |    .014799   .0207748     0.71   0.503    -.0360351    .0656331
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     34.25
       Model |  .278397536         1  .278397536   Prob > F        =    0.0011
    Residual |  .048773785         6  .008128964   R-squared       =    0.8509
-------------+----------------------------------   Adj R-squared   =    0.8261
       Total |   .32717132         7   .04673876   Root MSE        =    .09016

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .3853293   .0658441     5.85   0.001     .2242146    .5464441
       _cons |   .0858209   .0403211     2.13   0.077    -.0128413    .1844832
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  default ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =    147.52
       Model |  .047055938         1  .047055938   Prob > F        =    0.0000
    Residual |   .00191385         6  .000318975   R-squared       =    0.9609
-------------+----------------------------------   Adj R-squared   =    0.9544
       Total |  .048969788         7  .006995684   Root MSE        =    .01786

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1584187    .013043    12.15   0.000     .1265037    .1903338
       _cons |  -.0274236   .0079872    -3.43   0.014    -.0469675   -.0078797
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     25.10
       Model |  .043028035         1  .043028035   Prob > F        =    0.0024
    Residual |  .010286654         6  .001714442   R-squared       =    0.8071
-------------+----------------------------------   Adj R-squared   =    0.7749
       Total |  .053314689         7  .007616384   Root MSE        =    .04141

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1514869   .0302385     5.01   0.002     .0774959     .225478
       _cons |  -.0613714   .0185172    -3.31   0.016    -.1066814   -.0160613
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     97.18
       Model |  .045350964         1  .045350964   Prob > F        =    0.0001
    Residual |  .002800036         6  .000466673   R-squared       =    0.9418
-------------+----------------------------------   Adj R-squared   =    0.9322
       Total |     .048151         7  .006878714   Root MSE        =     .0216

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1555223   .0157763     9.86   0.000      .116919    .1941255
       _cons |  -.0323127    .009661    -3.34   0.016    -.0559522   -.0086731
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     15.08
       Model |  .058002157         1  .058002157   Prob > F        =    0.0081
    Residual |  .023083223         6  .003847204   R-squared       =    0.7153
-------------+----------------------------------   Adj R-squared   =    0.6679
       Total |   .08108538         7  .011583626   Root MSE        =    .06203

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |    .175882   .0452973     3.88   0.008     .0650436    .2867204
       _cons |  -.1049787   .0277388    -3.78   0.009    -.1728531   -.0371043
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  howrepayn3 ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =    255.98
       Model |  .044510787         1  .044510787   Prob > F        =    0.0000
    Residual |  .001043322         6  .000173887   R-squared       =    0.9771
-------------+----------------------------------   Adj R-squared   =    0.9733
       Total |  .045554109         7   .00650773   Root MSE        =    .01319

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1540749   .0096301    16.00   0.000     .1305108    .1776391
       _cons |   -.024079   .0058972    -4.08   0.006    -.0385091    -.009649
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     21.50
       Model |  .037873207         1  .037873207   Prob > F        =    0.0036
    Residual |  .010571057         6  .001761843   R-squared       =    0.7818
-------------+----------------------------------   Adj R-squared   =    0.7454
       Total |  .048444263         7  .006920609   Root MSE        =    .04197

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1421233   .0306537     4.64   0.004     .0671164    .2171302
       _cons |  -.0292432   .0187715    -1.56   0.170    -.0751754    .0166889
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =    117.59
       Model |  .036171203         1  .036171203   Prob > F        =    0.0000
    Residual |  .001845627         6  .000307605   R-squared       =    0.9515
-------------+----------------------------------   Adj R-squared   =    0.9434
       Total |   .03801683         7  .005430976   Root MSE        =    .01754

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1388932   .0128084    10.84   0.000     .1075521    .1702342
       _cons |  -.0200626   .0078435    -2.56   0.043     -.039255   -.0008702
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     68.89
       Model |   .03553888         1   .03553888   Prob > F        =    0.0002
    Residual |  .003095323         6  .000515887   R-squared       =    0.9199
-------------+----------------------------------   Adj R-squared   =    0.9065
       Total |  .038634203         7  .005519172   Root MSE        =    .02271

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1376738   .0165873     8.30   0.000      .097086    .1782615
       _cons |  -.0390717   .0101576    -3.85   0.008    -.0639265   -.0142168
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  howrepayn2 ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     43.27
       Model |  .035830482         1  .035830482   Prob > F        =    0.0006
    Residual |   .00496874         6  .000828123   R-squared       =    0.8782
-------------+----------------------------------   Adj R-squared   =    0.8579
       Total |  .040799222         7   .00582846   Root MSE        =    .02878

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1382374   .0210158     6.58   0.001     .0868135    .1896614
       _cons |   .0143099   .0128695     1.11   0.309    -.0171807    .0458005
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     14.82
       Model |  .029646161         1  .029646161   Prob > F        =    0.0085
    Residual |  .012000437         6  .002000073   R-squared       =    0.7119
-------------+----------------------------------   Adj R-squared   =    0.6638
       Total |  .041646598         7  .005949514   Root MSE        =    .04472

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1257429   .0326605     3.85   0.008     .0458257    .2056602
       _cons |   .0133456   .0200004     0.67   0.529    -.0355935    .0622848
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     17.54
       Model |  .027452809         1  .027452809   Prob > F        =    0.0058
    Residual |  .009392912         6  .001565485   R-squared       =    0.7451
-------------+----------------------------------   Adj R-squared   =    0.7026
       Total |   .03684572         7  .005263674   Root MSE        =    .03957

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1210021   .0288951     4.19   0.006     .0502984    .1917058
       _cons |   .0182836   .0176945     1.03   0.341    -.0250134    .0615806
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      4.75
       Model |   .02005543         1   .02005543   Prob > F        =    0.0722
    Residual |  .025345036         6  .004224173   R-squared       =    0.4417
-------------+----------------------------------   Adj R-squared   =    0.3487
       Total |  .045400466         7  .006485781   Root MSE        =    .06499

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .1034226   .0474646     2.18   0.072    -.0127192    .2195644
       _cons |   .0316798    .029066     1.09   0.318    -.0394422    .1028019
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  lenderrequestwork ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      3.02
       Model |  .109484612         1  .109484612   Prob > F        =    0.1327
    Residual |    .2172713         6  .036211883   R-squared       =    0.3351
-------------+----------------------------------   Adj R-squared   =    0.2242
       Total |  .326755912         7  .046679416   Root MSE        =    .19029

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .2416439   .1389712     1.74   0.133    -.0984064    .5816943
       _cons |  -.0622937   .0851022    -0.73   0.492    -.2705312    .1459437
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      2.96
       Model |  .125525382         1  .125525382   Prob > F        =    0.1361
    Residual |  .254452218         6  .042408703   R-squared       =    0.3303
-------------+----------------------------------   Adj R-squared   =    0.2187
       Total |    .3799776         7  .054282514   Root MSE        =    .20593

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .2587409   .1503927     1.72   0.136    -.1092568    .6267387
       _cons |  -.0950792   .0920964    -1.03   0.342    -.3204309    .1302725
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      2.93
       Model |  .116960901         1  .116960901   Prob > F        =    0.1375
    Residual |  .239142621         6  .039857103   R-squared       =    0.3284
-------------+----------------------------------   Adj R-squared   =    0.2165
       Total |  .356103522         7  .050871932   Root MSE        =    .19964

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .2497582   .1457982     1.71   0.138    -.1069972    .6065136
       _cons |  -.0637572   .0892828    -0.71   0.502    -.2822244    .1547099
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      3.99
       Model |  .198214049         1  .198214049   Prob > F        =    0.0927
    Residual |  .297941279         6   .04965688   R-squared       =    0.3995
-------------+----------------------------------   Adj R-squared   =    0.2994
       Total |  .496155328         7  .070879333   Root MSE        =    .22284

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .3251371    .162738     2.00   0.093    -.0730685    .7233428
       _cons |  -.1488205   .0996563    -1.49   0.186    -.3926707    .0950296
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  conscription ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      5.94
       Model |  .356480201         1  .356480201   Prob > F        =    0.0506
    Residual |  .359783832         6  .059963972   R-squared       =    0.4977
-------------+----------------------------------   Adj R-squared   =    0.4140
       Total |  .716264033         7  .102323433   Root MSE        =    .24488

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.4360307   .1788317    -2.44   0.051    -.8736162    .0015548
       _cons |   .0393651   .1095116     0.36   0.732    -.2286002    .3073303
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      8.52
       Model |  .388776021         1  .388776021   Prob > F        =    0.0267
    Residual |  .273866214         6  .045644369   R-squared       =    0.5867
-------------+----------------------------------   Adj R-squared   =    0.5178
       Total |  .662642236         7  .094663177   Root MSE        =    .21365

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.4553539   .1560246    -2.92   0.027    -.8371323   -.0735756
       _cons |  -.0824174   .0955451    -0.86   0.421    -.3162079    .1513731
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      6.19
       Model |  .366078269         1  .366078269   Prob > F        =    0.0473
    Residual |  .354803355         6  .059133893   R-squared       =    0.5078
-------------+----------------------------------   Adj R-squared   =    0.4258
       Total |  .720881624         7  .102983089   Root MSE        =    .24317

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.4418617   .1775896    -2.49   0.047    -.8764078   -.0073155
       _cons |   .0336736    .108751     0.31   0.767    -.2324305    .2997777
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      6.32
       Model |  .320375869         1  .320375869   Prob > F        =    0.0457
    Residual |  .304286319         6  .050714386   R-squared       =    0.5129
-------------+----------------------------------   Adj R-squared   =    0.4317
       Total |  .624662188         7  .089237455   Root MSE        =     .2252

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.4133608   .1644618    -2.51   0.046    -.8157842   -.0109373
       _cons |  -.0498627   .1007119    -0.50   0.638    -.2962958    .1965703
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
*********  repayendD ****************

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     30.91
       Model |   .01066376         1   .01066376   Prob > F        =    0.0014
    Residual |  .002069826         6  .000344971   R-squared       =    0.8375
-------------+----------------------------------   Adj R-squared   =    0.8104
       Total |  .012733586         7  .001819084   Root MSE        =    .01857

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .0754144   .0135641     5.56   0.001     .0422243    .1086046
       _cons |   .0303897   .0083063     3.66   0.011      .010065    .0507145
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     14.76
       Model |  .011575823         1  .011575823   Prob > F        =    0.0085
    Residual |  .004706643         6   .00078444   R-squared       =    0.7109
-------------+----------------------------------   Adj R-squared   =    0.6628
       Total |  .016282465         7  .002326066   Root MSE        =    .02801

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .0785734   .0204541     3.84   0.009     .0285241    .1286226
       _cons |   .0391099   .0125255     3.12   0.021     .0084611    .0697587
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     27.93
       Model |  .009832707         1  .009832707   Prob > F        =    0.0019
    Residual |  .002111933         6  .000351989   R-squared       =    0.8232
-------------+----------------------------------   Adj R-squared   =    0.7937
       Total |   .01194464         7  .001706377   Root MSE        =    .01876

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .0724162   .0137014     5.29   0.002     .0388902    .1059423
       _cons |   .0326017   .0083903     3.89   0.008     .0120712    .0531321
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      0.74
       Model |  .002729504         1  .002729504   Prob > F        =    0.4232
    Residual |  .022177079         6   .00369618   R-squared       =    0.1096
-------------+----------------------------------   Adj R-squared   =   -0.0388
       Total |  .024906583         7  .003558083   Root MSE        =     .0608

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .0381541   .0443993     0.86   0.423     -.070487    .1467952
       _cons |    .110842   .0271889     4.08   0.007     .0443132    .1773708
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)

. restore

. 
. 
. 
. 
. preserve

. gen coef = .
(11,032 missing values generated)

. gen fake = 0

. gen ydum = .
(11,032 missing values generated)

. replace ydum = 0 if _n==1
(1 real change made)

. gen enforced = 0 + 1*(_n>5) if _n<9
(11,024 missing values generated)

. gen trend = _n

. 
. keep if repayfull ==0 | repayend<2
(1,529 observations deleted)

.         
. foreach v in  noforce remind  {
  2. local noforcelbl "No Harassment"
  3. local remindlbl "Reminder Call "
  4. 
. 
. qui xi: reg `v' i.year
  5.         forvalues x = 10/16 {
  6.                 replace ydum = _b[_Iyear_20`x'] if _n==`x'-8
  7.                 }
  8. reg ydum enforced
  9. est store ols
 10.         
. qui xi: areg `v' i.year, abs(id)
 11.         forvalues x = 10/16 {
 12.                 quietly replace ydum = _b[_Iyear_20`x'] if _n==`x'-8
 13.                 }
 14. reg ydum enforced
 15. est store fe_b  
 16. 
. qui xi: areg `v' i.year, abs(sharkid5)
 17.         forvalues x = 10/16 {
 18.                 quietly replace ydum = _b[_Iyear_20`x'] if _n==`x'-8
 19.                 }
 20. reg ydum enforced
 21. est store fe_l  
 22. 
. qui xi: areg `v' i.year, abs(shark5_bor)
 23.         forvalues x = 10/16 {
 24.                 quietly replace ydum = _b[_Iyear_20`x'] if _n==`x'-8
 25.                 }
 26. reg ydum enforced       
 27. est store fe_bl 
 28. 
. lab var enforced "``v'lbl'"
 29. esttab ols fe_b fe_l fe_bl using table_reg_restats.tex, append  ///
>          nomtitles noconstant ///
>         label booktabs b(3) se(3) eqlabels(none)  unstack  noobs nostar ///
>     fragment nolines nonumbers
 30. }
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     84.59
       Model |   .00774398         1   .00774398   Prob > F        =    0.0001
    Residual |  .000549301         6   .00009155   R-squared       =    0.9338
-------------+----------------------------------   Adj R-squared   =    0.9227
       Total |  .008293281         7  .001184754   Root MSE        =    .00957

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   -.064266   .0069876    -9.20   0.000    -.0813641    -.047168
       _cons |  -.0094162    .004279    -2.20   0.070    -.0198866    .0010542
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     21.69
       Model |  .007164481         1  .007164481   Prob > F        =    0.0035
    Residual |  .001981809         6  .000330302   R-squared       =    0.7833
-------------+----------------------------------   Adj R-squared   =    0.7472
       Total |   .00914629         7  .001306613   Root MSE        =    .01817

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.0618147   .0132726    -4.66   0.003    -.0942915   -.0293379
       _cons |   .0064427   .0081277     0.79   0.458    -.0134452    .0263306
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     56.87
       Model |  .007433587         1  .007433587   Prob > F        =    0.0003
    Residual |  .000784275         6  .000130713   R-squared       =    0.9046
-------------+----------------------------------   Adj R-squared   =    0.8887
       Total |  .008217862         7   .00117398   Root MSE        =    .01143

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |  -.0629649   .0083495    -7.54   0.000    -.0833953   -.0425345
       _cons |  -.0133993    .005113    -2.62   0.040    -.0259103   -.0008883
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =      8.28
       Model |   .00787465         1   .00787465   Prob > F        =    0.0281
    Residual |  .005703631         6  .000950605   R-squared       =    0.5799
-------------+----------------------------------   Adj R-squared   =    0.5099
       Total |  .013578282         7  .001939755   Root MSE        =    .03083

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   -.064806   .0225164    -2.88   0.028    -.1199017   -.0097103
       _cons |   .0141413   .0137884     1.03   0.345    -.0195978    .0478804
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)
(1 real change made)

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =    157.41
       Model |  .014477819         1  .014477819   Prob > F        =    0.0000
    Residual |  .000551863         6  .000091977   R-squared       =    0.9633
-------------+----------------------------------   Adj R-squared   =    0.9572
       Total |  .015029682         7  .002147097   Root MSE        =    .00959

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .0878721   .0070039    12.55   0.000     .0707342      .10501
       _cons |   .0147138    .004289     3.43   0.014      .004219    .0252085
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     26.54
       Model |   .01356687         1   .01356687   Prob > F        =    0.0021
    Residual |  .003067525         6  .000511254   R-squared       =    0.8156
-------------+----------------------------------   Adj R-squared   =    0.7849
       Total |  .016634395         7  .002376342   Root MSE        =    .02261

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .0850627   .0165127     5.15   0.002     .0446576    .1254678
       _cons |  -.0062319   .0101119    -0.62   0.560    -.0309749    .0185111
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     92.76
       Model |  .013062059         1  .013062059   Prob > F        =    0.0001
    Residual |  .000844896         6  .000140816   R-squared       =    0.9392
-------------+----------------------------------   Adj R-squared   =    0.9291
       Total |  .013906955         7  .001986708   Root MSE        =    .01187

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |   .0834652   .0086661     9.63   0.000     .0622599    .1046704
       _cons |   .0200014   .0053069     3.77   0.009     .0070159    .0329869
------------------------------------------------------------------------------

      Source |       SS           df       MS      Number of obs   =         8
-------------+----------------------------------   F(1, 6)         =     14.30
       Model |  .012302171         1  .012302171   Prob > F        =    0.0092
    Residual |   .00516326         6  .000860543   R-squared       =    0.7044
-------------+----------------------------------   Adj R-squared   =    0.6551
       Total |  .017465431         7  .002495062   Root MSE        =    .02934

------------------------------------------------------------------------------
        ydum |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
    enforced |    .081001   .0214233     3.78   0.009     .0285801    .1334218
       _cons |  -.0036665    .013119    -0.28   0.789    -.0357676    .0284346
------------------------------------------------------------------------------
(output written to table_reg_restats.tex)

. 
. restore

. 
. log close
      name:  <unnamed>
       log:  /Users/huailu/Dropbox/Loanshark/New_version/ReStats Final Files/Loanshark_Manuscript_Tables.log
  log type:  text
 closed on:  17 Aug 2022, 00:02:15
---------------------------------------------------------------------------------------------------------------------------------------
